package edu.sctu.xialei.june.day20150628two_test.good;

import edu.sctu.xialei.june.day20150628two_test.json.AppBean;

import java.util.HashMap;

/**
 * Created by Administrator on 2015/6/28.
 */
public class GoodsPriceCounter {

    public HashMap<String,Integer> countPrice(AppBean appBean){

        int behave100 = 0;
        int below100 = 0;

        for (int i = 0; i < appBean.list.size(); i++) {
            if (appBean.list.get(i).goods_price >= 100) {
                behave100++;
            }else {
                below100++;
            }
        }

        HashMap<String,Integer> map = new HashMap();
        map.put("behave100",behave100);
        map.put("below100",below100);

        return map;
    }
}
